package cn.xiaoliu.hrm.prop;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "oauth.type")
@Data
public class OauthProperties {
    private OauthDetails system;
    private OauthDetails website;

    public OauthDetails getOauthDetails(Integer type){
        if (type.intValue() == 0){
            return system;
        }else if (type.intValue() == 1){
            return website;
        }else {
            return null;
        }
    }
}
